package com.jack.dao;

import java.util.Map;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import com.jack.entity.User;

@Repository
public interface UserRepository extends JpaRepository<User, Long> {

	@Query("select t from User t where t.id = ? and t.name = ?")
	public User get1(@Param("id") Long id,@Param("name") String name);
//	
//	@Query("select t from User t where t.id = map. and t.name = ?")
//	public User get2(@Param("map") Map<String, Object> map);
}
